from appium.webdriver.common.mobileby import MobileBy
from appium_PO_test.page.base_page import BasePage
from appium_PO_test.page.contactlist_page import ContactListPage


class MainPage(BasePage):
    contact_element = (MobileBy.XPATH, "//*[@text='通讯录']")
    def goto_contactlist(self):
        # click 通讯录
        self.find(*self.contact_element).click()
        #self.driver.find_element(MobileBy.XPATH, "//*[@text='通讯录']").click()
        return ContactListPage(self.driver)